* D:\E\replications\BJPS2020\rawdata\cnef\OECD_CPI.do

* cd D:\E\replications\BJPS2020\
insheet using ./rawdata/cnef/OECD_CPI.csv, comma clear

keep if subject=="TOT"
keep if measure=="IDX2015"
keep if frequency=="A"

isid location time
 
rename value cpi2015

rename location iso3c
kountry iso3c, from(iso3c) to(cown)
rename _COWN ccode
labmask ccode, val(iso3c)
numlabel ccode, add force
tab iso3c if ccode==.
drop if ccode==.
tab ccode, m

destring time, gen(year)
tabstat year, by(ccode) s(min max N)

keep ccode year cpi2015

note: source = https://data.oecd.org/price/inflation-cpi.htm
note: ./rawdata/cnef/OECD_CPI.do
note: ./rawdata/cnef/OECD_CPI.dta
note: Created on `= c(current_date)'
save ./rawdata/cnef/OECD_CPI.dta, replace
